<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMerchantAppliesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('merchant_applies', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->index()->comment('用户id');
            $table->string('id_card_no', 190)->comment('身份证号');
            $table->string('id_card_name')->comment('身份证姓名');
            $table->string('contact_mobile')->comment('联系电话');
            $table->string('contact_email')->comment('联系邮箱');
            $table->string('bank_no')->comment('银行卡号');
            $table->string('acct_mobile')->comment('银行预留手机号');
            $table->string('id_card_front')->comment('身份证正面');
            $table->string('id_card_back')->comment('身份证反面');
            $table->string('bank_card_front')->comment('银行卡正面');
            
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('merchant_applies');
    }
}
